package com.means.polymerize.common.constants;

import lombok.AllArgsConstructor;
import lombok.Getter;

import static java.net.HttpURLConnection.*;

/**
 * The enum Result code.
 *
 * @author xuhaifeng
 * @date 2020.12.03
 */
@Getter
@AllArgsConstructor
public enum ResultCode {
    /**
     * HTTP Status-Code 200: OK.
     */
    OK(HTTP_OK),
    /**
     * HTTP Status-Code 400: Bad Request.
     */
    BAD_REQUEST(HTTP_BAD_REQUEST),
    /**
     * HTTP Status-Code 401: Unauthorized.
     */
    UNAUTHORIZED(HTTP_UNAUTHORIZED),
    /**
     * HTTP Status-Code 500: Internal Server Error.
     */
    INTERNAL_ERROR(HTTP_INTERNAL_ERROR);
    /**
     * Result Code
     */
    public Integer code;
}
